<% # @page_title="Password Hashes" %>
<% @mselect_hashes=1 %>
<% @table = @password_hashs %>
<% @action = "index" %>
<% @cont = "password_hashs" %>

<%= render :partial => 'layouts/page_count' %>

<table>
<thead>
  <tr>
    <th scope="col">
      <%= sort_link("Area", "session_test_area") %>
      <%= filterx_icon("Remove filter on #{session[:test_area]}", session[:test_area], :test_area, {:controller => 'test_areas', :action => 'set', :id => 'all'}) %>
    </th>

    <th scope="col"><%= sort_link("Host", "ip_address") %>
      <%= filterx_icon("Remove filter on host", @url_params[:host_id_v], :host_id_v, {:controller => @cont}) %>
    </th>

    <th scope="col"><%= sort_link("Type", "type") %>
      <%= filterx_icon("Remove filter on port #{@url_params[:type_v]}", @url_params[:type_v], :type_v, {:controller => @cont}) %>
    </th>

    <th scope="col"><%= sort_link("Username", "username") %>
      <%= filterx_icon("Remove filter on port #{@url_params[:username_v]}", @url_params[:username_v], :username_v, {:controller => @cont}) %>
    </th>

    <th scope="col"><%= sort_link("Hash", "password_hash") %>
      <%= filterx_icon("Remove filter on port #{@url_params[:hash_v]}", @url_params[:hash_v], :hash_v, {:controller => @cont}) %>
    </th>

     <th scope="col"><%= sort_link("Password", "password") %>
      <%= filterx_icon("Remove filter on port #{@url_params[:password_v]}", @url_params[:password_v], :password_v, {:controller => @cont}) %>
    </th>
  </tr>
</thead>

<tbody>
<%
odd_or_even = 0
for password_hash in @password_hashs
    odd_or_even = 1 - odd_or_even
%>
  <tr class="odd<%=h odd_or_even %>">
    <td><%=h password_hash.test_area_name %>
	<%= filter_icon("Show only #{password_hash.test_area_name}", session[:test_area], {:controller => 'test_areas', :action => 'set', :id => password_hash.test_area_id}) %>
    </td>

    <td><%= link_to_host(password_hash.ip_address, {:controller => 'hosts', :action => 'showpasswordhashes', :id => password_hash.host_id}) %>
	<%= filter_icon("Show only #{password_hash.ip_address}", @url_params[:host_id_v], {:controller => 'password_hashs', :host_id_v => password_hash.host_id}) %>
    </td>

    <td><%=h password_hash.password_hash_type_name %>
	<%= filter_icon("Show only #{password_hash.password_hash_type_name}", @url_params[:type_v], {:controller => 'password_hashs', :type_v => password_hash.password_hash_type_name}) %>
    </td>

    <td><%=h password_hash.username %>
	<%= filter_icon("Show only #{password_hash.username}", @url_params[:username_v], {:controller => 'password_hashs', :username_v => password_hash.username}) %>
    </td>

    <td><%=h password_hash.password_hash %>
	<%= filter_icon("Show only #{password_hash.password_hash}", @url_params[:hash_v], {:controller => 'password_hashs', :hash_v => password_hash.password_hash}) %>
    </td>

    <td><%=h password_hash.password %>
	<%= filter_icon("Show only #{password_hash.password}", @url_params[:password_v], {:controller => 'password_hashs', :password_v => password_hash.password}) %>
    </td>

  </tr>
<% end %>
</tbody>
</table>
 
<%= render :partial => 'layouts/page_count' %>
